<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998


************************************************************************

               Static Argument Transformation pass

************************************************************************

May be seen as removing invariants from loops:
Arguments of recursive functions that do not change in recursive
calls are removed from the recursion, which is done locally
and only passes the arguments which effectively change.

Example:
map = /\ ab -&gt; \f -&gt; \xs -&gt; case xs of
                 []       -&gt; []
                 (a:b) -&gt; f a : map f b

as map is recursively called with the same argument f (unmodified)
we transform it to

map = /\ ab -&gt; \f -&gt; \xs -&gt; let map' ys = case ys of
                       []     -&gt; []
                       (a:b) -&gt; f a : map' b
                in map' xs

Notice that for a compiler that uses lambda lifting this is
useless as map' will be transformed back to what map was.

We could possibly do the same for big lambdas, but we don't as
they will eventually be removed in later stages of the compiler,
therefore there is no penalty in keeping them.

We only apply the SAT when the number of static args is &gt; 2. This
produces few bad cases.  See
                should_transform
in saTransform.

Here are the headline nofib results:
                  Size    Allocs   Runtime
Min             +0.0%    -13.7%    -21.4%
Max             +0.1%     +0.0%     +5.4%
Geometric Mean  +0.0%     -0.2%     -6.9%

The previous patch, to fix polymorphic floatout demand signatures, is
essential to make this work well!
-}</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-pragma">{-# LANGUAGE CPP, PatternSynonyms #-}</span><span>
</span><span id="line-52"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.Opt.StaticArgs</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#doStaticArgs"><span class="hs-identifier">doStaticArgs</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.html"><span class="hs-identifier">GHC.Core.Coercion</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html"><span class="hs-identifier">GHC.Types.Var.Set</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Traversable.html#mapAccumL"><span class="hs-identifier">mapAccumL</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-77"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#doStaticArgs"><span class="hs-identifier hs-type">doStaticArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreProgram"><span class="hs-identifier hs-type">CoreProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreProgram"><span class="hs-identifier hs-type">CoreProgram</span></a></span><span>
</span><span id="line-78"></span><span id="doStaticArgs"><span class="annot"><span class="annottext">doStaticArgs :: UniqSupply -&gt; CoreProgram -&gt; CoreProgram
</span><a href="GHC.Core.Opt.StaticArgs.html#doStaticArgs"><span class="hs-identifier hs-var hs-var">doStaticArgs</span></a></span></span><span> </span><span id="local-6989586621680957849"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957849"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680957848"><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680957848"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UniqSupply, CoreProgram) -&gt; CoreProgram
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((UniqSupply, CoreProgram) -&gt; CoreProgram)
-&gt; (UniqSupply, CoreProgram) -&gt; CoreProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSupply -&gt; CoreBind -&gt; (UniqSupply, CoreBind))
-&gt; UniqSupply -&gt; CoreProgram -&gt; (UniqSupply, CoreProgram)
forall (t :: * -&gt; *) s a b.
Traversable t =&gt;
(s -&gt; a -&gt; (s, b)) -&gt; s -&gt; t a -&gt; (s, t b)
</span><a href="../../base/src/Data.Traversable.html#mapAccumL"><span class="hs-identifier hs-var">mapAccumL</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; CoreBind -&gt; (UniqSupply, CoreBind)
</span><a href="#local-6989586621680957847"><span class="hs-identifier hs-var">sat_bind_threaded_us</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957849"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680957848"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-80"></span><span>    </span><span id="local-6989586621680957847"><span class="annot"><span class="annottext">sat_bind_threaded_us :: UniqSupply -&gt; CoreBind -&gt; (UniqSupply, CoreBind)
</span><a href="#local-6989586621680957847"><span class="hs-identifier hs-var hs-var">sat_bind_threaded_us</span></a></span></span><span> </span><span id="local-6989586621680957846"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957846"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680957845"><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957845"><span class="hs-identifier hs-var">bind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957844"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957844"><span class="hs-identifier hs-var">us1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957843"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957843"><span class="hs-identifier hs-var">us2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (UniqSupply, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#splitUniqSupply"><span class="hs-identifier hs-var">splitUniqSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957846"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-82"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957844"><span class="hs-identifier hs-var">us1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(CoreBind, IdSATInfo) -&gt; CoreBind
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((CoreBind, IdSATInfo) -&gt; CoreBind)
-&gt; (CoreBind, IdSATInfo) -&gt; CoreBind
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; SatM (CoreBind, IdSATInfo) -&gt; (CoreBind, IdSATInfo)
forall a. UniqSupply -&gt; SatM a -&gt; a
</span><a href="GHC.Core.Opt.StaticArgs.html#runSAT"><span class="hs-identifier hs-var">runSAT</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680957843"><span class="hs-identifier hs-var">us2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBind -&gt; IdSet -&gt; SatM (CoreBind, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-var">satBind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957845"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">-- We don't bother to SAT recursive groups since it can lead</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- to massive code expansion: see Andre Santos' thesis for details.</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- This means we only apply the actual SAT to Rec groups of one element,</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- but we want to recurse into the others anyway to discover other binds</span><span>
</span><span id="line-88"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-type">satBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span id="satBind"><span class="annot"><span class="annottext">satBind :: CoreBind -&gt; IdSet -&gt; SatM (CoreBind, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-var hs-var">satBind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span id="local-6989586621680957837"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957837"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680957836"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957836"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957835"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957835"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957834"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957834"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957833"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957833"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957832"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957832"><span class="hs-identifier hs-var">expr_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957836"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957835"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-91"></span><span>    </span><span class="annot"><span class="annottext">(CoreBind, IdSATInfo) -&gt; SatM (CoreBind, IdSATInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Expr Id -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957837"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957834"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957832"><span class="hs-identifier hs-var">expr_app</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957833"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-var">satBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621680957828"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957827"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957827"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957826"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957826"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957824"><span class="annot"><span class="annottext">interesting_ids' :: IdSet
</span><a href="#local-6989586621680957824"><span class="hs-identifier hs-var hs-var">interesting_ids'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957826"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet -&gt; Id -&gt; IdSet
forall a. Uniquable a =&gt; UniqSet a -&gt; a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#addOneToUniqSet"><span class="hs-operator hs-var">`addOneToUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680957822"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957822"><span class="hs-identifier hs-var">rhs_binders</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957821"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957821"><span class="hs-identifier hs-var">rhs_body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; ([Id], Expr Id)
forall b. Expr b -&gt; ([b], Expr b)
</span><a href="GHC.Core.html#collectBinders"><span class="hs-identifier hs-var">collectBinders</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957827"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-95"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957819"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957819"><span class="hs-identifier hs-var">rhs_body'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957818"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957818"><span class="hs-identifier hs-var">sat_info_rhs_body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satTopLevelExpr"><span class="hs-identifier hs-var">satTopLevelExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957821"><span class="hs-identifier hs-var">rhs_body</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957824"><span class="hs-identifier hs-var">interesting_ids'</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957816"><span class="annot"><span class="annottext">sat_info_rhs_from_args :: IdSATInfo
</span><a href="#local-6989586621680957816"><span class="hs-identifier hs-var hs-var">sat_info_rhs_from_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SATInfo -&gt; IdSATInfo
forall a. Id -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#unitVarEnv"><span class="hs-identifier hs-var">unitVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; SATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#bindersToSATInfo"><span class="hs-identifier hs-var">bindersToSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957822"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>        </span><span id="local-6989586621680957813"><span class="annot"><span class="annottext">sat_info_rhs' :: IdSATInfo
</span><a href="#local-6989586621680957813"><span class="hs-identifier hs-var hs-var">sat_info_rhs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var">mergeIdSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957816"><span class="hs-identifier hs-var">sat_info_rhs_from_args</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957818"><span class="hs-identifier hs-var">sat_info_rhs_body</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span>        </span><span id="local-6989586621680957810"><span class="annot"><span class="annottext">shadowing :: Bool
</span><a href="#local-6989586621680957810"><span class="hs-identifier hs-var hs-var">shadowing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-operator hs-var">`elementOfUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957826"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-100"></span><span>        </span><span id="local-6989586621680957807"><span class="annot"><span class="annottext">sat_info_rhs'' :: IdSATInfo
</span><a href="#local-6989586621680957807"><span class="hs-identifier hs-var hs-var">sat_info_rhs''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680957810"><span class="hs-identifier hs-var">shadowing</span></a></span><span>
</span><span id="line-101"></span><span>                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957813"><span class="hs-identifier hs-var">sat_info_rhs'</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; Id -&gt; IdSATInfo
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; key -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#delFromUFM"><span class="hs-operator hs-var">`delFromUFM`</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-comment">-- For safety</span><span>
</span><span id="line-102"></span><span>                        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957813"><span class="hs-identifier hs-var">sat_info_rhs'</span></a></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span>    </span><span id="local-6989586621680957805"><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957805"><span class="hs-identifier hs-var">bind'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Maybe SATInfo -&gt; [Id] -&gt; Expr Id -&gt; SatM CoreBind
</span><a href="GHC.Core.Opt.StaticArgs.html#saTransformMaybe"><span class="hs-identifier hs-var">saTransformMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdSATInfo -&gt; Id -&gt; Maybe SATInfo
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957813"><span class="hs-identifier hs-var">sat_info_rhs'</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957828"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>                              </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957822"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957819"><span class="hs-identifier hs-var">rhs_body'</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span class="annot"><span class="annottext">(CoreBind, IdSATInfo) -&gt; SatM (CoreBind, IdSATInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957805"><span class="hs-identifier hs-var">bind'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957807"><span class="hs-identifier hs-var">sat_info_rhs''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-var">satBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680957802"><span class="annot"><span class="annottext">[(Id, Expr Id)]
</span><a href="#local-6989586621680957802"><span class="hs-identifier hs-var">pairs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957801"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957801"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-108"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957800"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957800"><span class="hs-identifier hs-var">binders</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957799"><span class="annot"><span class="annottext">[Expr Id]
</span><a href="#local-6989586621680957799"><span class="hs-identifier hs-var">rhss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Id, Expr Id)] -&gt; ([Id], [Expr Id])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(Id, Expr Id)]
</span><a href="#local-6989586621680957802"><span class="hs-identifier hs-var">pairs</span></a></span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621680957797"><span class="annot"><span class="annottext">[(Expr Id, IdSATInfo)]
</span><a href="#local-6989586621680957797"><span class="hs-identifier hs-var">rhss_SATed</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Expr Id -&gt; SatM (Expr Id, IdSATInfo))
-&gt; [Expr Id] -&gt; UniqSM [(Expr Id, IdSATInfo)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680957795"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957795"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satTopLevelExpr"><span class="hs-identifier hs-var">satTopLevelExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957795"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957801"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Expr Id]
</span><a href="#local-6989586621680957799"><span class="hs-identifier hs-var">rhss</span></a></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957794"><span class="annot"><span class="annottext">[Expr Id]
</span><a href="#local-6989586621680957794"><span class="hs-identifier hs-var">rhss'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957793"><span class="annot"><span class="annottext">[IdSATInfo]
</span><a href="#local-6989586621680957793"><span class="hs-identifier hs-var">sat_info_rhss'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Expr Id, IdSATInfo)] -&gt; ([Expr Id], [IdSATInfo])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(Expr Id, IdSATInfo)]
</span><a href="#local-6989586621680957797"><span class="hs-identifier hs-var">rhss_SATed</span></a></span><span>
</span><span id="line-111"></span><span>    </span><span class="annot"><span class="annottext">(CoreBind, IdSATInfo) -&gt; SatM (CoreBind, IdSATInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Id, Expr Id)] -&gt; CoreBind
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [Id] -&gt; [Expr Id] -&gt; [(Id, Expr Id)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;satBind&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957800"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">[Expr Id]
</span><a href="#local-6989586621680957794"><span class="hs-identifier hs-var">rhss'</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IdSATInfo] -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfos"><span class="hs-identifier hs-var">mergeIdSATInfos</span></a></span><span> </span><span class="annot"><span class="annottext">[IdSATInfo]
</span><a href="#local-6989586621680957793"><span class="hs-identifier hs-var">sat_info_rhss'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-keyword">data</span><span> </span><span id="App"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#App"><span class="hs-identifier hs-var">App</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="VarApp"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-var">VarApp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="TypeApp"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-var">TypeApp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="CoApp"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-var">CoApp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span>
</span><span id="line-114"></span><span class="hs-keyword">data</span><span> </span><span id="Staticness"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Staticness"><span class="hs-identifier hs-var">Staticness</span></a></span></span><span> </span><span id="local-6989586621680957934"><span class="annot"><a href="#local-6989586621680957934"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Static"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621680957934"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="NotStatic"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-keyword">type</span><span> </span><span id="IdAppInfo"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdAppInfo"><span class="hs-identifier hs-var">IdAppInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-keyword">type</span><span> </span><span id="SATInfo"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-var">SATInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Staticness"><span class="hs-identifier hs-type">Staticness</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#App"><span class="hs-identifier hs-type">App</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-119"></span><span class="hs-keyword">type</span><span> </span><span id="IdSATInfo"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-var">IdSATInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#IdEnv"><span class="hs-identifier hs-type">IdEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span>
</span><span id="line-120"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-type">emptyIdSATInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span>
</span><span id="line-121"></span><span id="emptyIdSATInfo"><span class="annot"><span class="annottext">emptyIdSATInfo :: IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var hs-var">emptyIdSATInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">{-
pprIdSATInfo id_sat_info = vcat (map pprIdAndSATInfo (Map.toList id_sat_info))
  where pprIdAndSATInfo (v, sat_info) = hang (ppr v &lt;&gt; colon) 4 (pprSATInfo sat_info)
-}</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#pprSATInfo"><span class="hs-identifier hs-type">pprSATInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-129"></span><span id="pprSATInfo"><span class="annot"><span class="annottext">pprSATInfo :: SATInfo -&gt; SDoc
</span><a href="GHC.Core.Opt.StaticArgs.html#pprSATInfo"><span class="hs-identifier hs-var hs-var">pprSATInfo</span></a></span></span><span> </span><span id="local-6989586621680957781"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957781"><span class="hs-identifier hs-var">staticness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; SDoc) -&gt; SATInfo -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SDoc
</span><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-var">pprStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957781"><span class="hs-identifier hs-var">staticness</span></a></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-type">pprStaticness</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Staticness"><span class="hs-identifier hs-type">Staticness</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-132"></span><span id="pprStaticness"><span class="annot"><span class="annottext">pprStaticness :: Staticness App -&gt; SDoc
</span><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-var hs-var">pprStaticness</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-type">VarApp</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SV&quot;</span></span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-var">pprStaticness</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-type">TypeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ST&quot;</span></span><span>
</span><span id="line-134"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-var">pprStaticness</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-type">CoApp</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SC&quot;</span></span><span>
</span><span id="line-135"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#pprStaticness"><span class="hs-identifier hs-var">pprStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NS&quot;</span></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#mergeSATInfo"><span class="hs-identifier hs-type">mergeSATInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span>
</span><span id="line-139"></span><span id="mergeSATInfo"><span class="annot"><span class="annottext">mergeSATInfo :: SATInfo -&gt; SATInfo -&gt; SATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeSATInfo"><span class="hs-identifier hs-var hs-var">mergeSATInfo</span></a></span></span><span> </span><span id="local-6989586621680957776"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957776"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621680957775"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957775"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; Staticness App -&gt; Staticness App)
-&gt; SATInfo -&gt; SATInfo -&gt; SATInfo
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="../../base/src/GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; Staticness App -&gt; Staticness App
</span><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957776"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957775"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-140"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-141"></span><span>    </span><span id="local-6989586621680957773"><span class="annot"><span class="annottext">mergeSA :: Staticness App -&gt; Staticness App -&gt; Staticness App
</span><a href="#local-6989586621680957773"><span class="hs-identifier hs-var hs-var">mergeSA</span></a></span></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-143"></span><span>    </span><span class="annot"><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-type">VarApp</span></a></span><span> </span><span id="local-6989586621680957768"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957768"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-type">VarApp</span></a></span><span> </span><span id="local-6989586621680957767"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957767"><span class="hs-identifier hs-var">v'</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957768"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957767"><span class="hs-identifier hs-var">v'</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-var">VarApp</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957768"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-146"></span><span>    </span><span class="annot"><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-type">TypeApp</span></a></span><span> </span><span id="local-6989586621680957766"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957766"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-type">TypeApp</span></a></span><span> </span><span id="local-6989586621680957765"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957765"><span class="hs-identifier hs-var">t'</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957766"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Type.html#eqType"><span class="hs-operator hs-var">`eqType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957765"><span class="hs-identifier hs-var">t'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-var">TypeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957766"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-149"></span><span>    </span><span class="annot"><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-type">CoApp</span></a></span><span> </span><span id="local-6989586621680957763"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957763"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-type">CoApp</span></a></span><span> </span><span id="local-6989586621680957762"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957762"><span class="hs-identifier hs-var">c'</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957763"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; Coercion -&gt; Bool
</span><a href="GHC.Core.Coercion.html#eqCoercion"><span class="hs-operator hs-var">`eqCoercion`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957762"><span class="hs-identifier hs-var">c'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-var">CoApp</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957763"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><a href="#local-6989586621680957773"><span class="hs-identifier hs-var">mergeSA</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Staticness App
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mergeSATInfo&quot;</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; Staticness App) -&gt; SDoc -&gt; Staticness App
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-153"></span><span>                          </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Left:&quot;</span></span><span>
</span><span id="line-154"></span><span>                       </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SDoc
</span><a href="GHC.Core.Opt.StaticArgs.html#pprSATInfo"><span class="hs-identifier hs-var">pprSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957776"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span>
</span><span id="line-155"></span><span>                       </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Right:&quot;</span></span><span>
</span><span id="line-156"></span><span>                       </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SDoc
</span><a href="GHC.Core.Opt.StaticArgs.html#pprSATInfo"><span class="hs-identifier hs-var">pprSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957775"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-type">mergeIdSATInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span>
</span><span id="line-159"></span><span id="mergeIdSATInfo"><span class="annot"><span class="annottext">mergeIdSATInfo :: IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var hs-var">mergeIdSATInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SATInfo -&gt; SATInfo -&gt; SATInfo)
-&gt; IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
forall elt key.
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFM_C"><span class="hs-identifier hs-var">plusUFM_C</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SATInfo -&gt; SATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeSATInfo"><span class="hs-identifier hs-var">mergeSATInfo</span></a></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfos"><span class="hs-identifier hs-type">mergeIdSATInfos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span>
</span><span id="line-162"></span><span id="mergeIdSATInfos"><span class="annot"><span class="annottext">mergeIdSATInfos :: [IdSATInfo] -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfos"><span class="hs-identifier hs-var hs-var">mergeIdSATInfos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo)
-&gt; IdSATInfo -&gt; [IdSATInfo] -&gt; IdSATInfo
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var">mergeIdSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var">emptyIdSATInfo</span></a></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#bindersToSATInfo"><span class="hs-identifier hs-type">bindersToSATInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span>
</span><span id="line-165"></span><span id="bindersToSATInfo"><span class="annot"><span class="annottext">bindersToSATInfo :: [Id] -&gt; SATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#bindersToSATInfo"><span class="hs-identifier hs-var hs-var">bindersToSATInfo</span></a></span></span><span> </span><span id="local-6989586621680957756"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957756"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Staticness App) -&gt; [Id] -&gt; SATInfo
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="annot"><span class="annottext">(App -&gt; Staticness App) -&gt; (Id -&gt; App) -&gt; Id -&gt; Staticness App
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; App
</span><a href="#local-6989586621680957754"><span class="hs-identifier hs-var">binderToApp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957756"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-166"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680957754"><span class="annot"><span class="annottext">binderToApp :: Id -&gt; App
</span><a href="#local-6989586621680957754"><span class="hs-identifier hs-var hs-var">binderToApp</span></a></span></span><span> </span><span id="local-6989586621680957753"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-var">VarApp</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-167"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isTyVar"><span class="hs-identifier hs-var">isTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-var">TypeApp</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; App) -&gt; Type -&gt; App
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTy"><span class="hs-identifier hs-var">mkTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-168"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-var">CoApp</span></a></span><span> </span><span class="annot"><span class="annottext">(Coercion -&gt; App) -&gt; Coercion -&gt; App
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkCoVarCo"><span class="hs-identifier hs-var">mkCoVarCo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957753"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-type">finalizeApp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdAppInfo"><span class="hs-identifier hs-type">IdAppInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span>
</span><span id="line-171"></span><span id="finalizeApp"><span class="annot"><span class="annottext">finalizeApp :: Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var hs-var">finalizeApp</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621680957748"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957748"><span class="hs-identifier hs-var">id_sat_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957748"><span class="hs-identifier hs-var">id_sat_info</span></a></span><span>
</span><span id="line-172"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957747"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957747"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957746"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957746"><span class="hs-identifier hs-var">sat_info'</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957745"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957745"><span class="hs-identifier hs-var">id_sat_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957743"><span class="annot"><span class="annottext">sat_info'' :: SATInfo
</span><a href="#local-6989586621680957743"><span class="hs-identifier hs-var hs-var">sat_info''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; Id -&gt; Maybe SATInfo
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957745"><span class="hs-identifier hs-var">id_sat_info</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957747"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-174"></span><span>                        </span><span class="annot"><span class="annottext">Maybe SATInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957746"><span class="hs-identifier hs-var">sat_info'</span></a></span><span>
</span><span id="line-175"></span><span>                        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680957742"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957742"><span class="hs-identifier hs-var">sat_info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SATInfo -&gt; SATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeSATInfo"><span class="hs-identifier hs-var">mergeSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957742"><span class="hs-identifier hs-var">sat_info</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957746"><span class="hs-identifier hs-var">sat_info'</span></a></span><span>
</span><span id="line-176"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; Id -&gt; SATInfo -&gt; IdSATInfo
forall a. VarEnv a -&gt; Id -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957745"><span class="hs-identifier hs-var">id_sat_info</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957747"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957743"><span class="hs-identifier hs-var">sat_info''</span></a></span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satTopLevelExpr"><span class="hs-identifier hs-type">satTopLevelExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span id="satTopLevelExpr"><span class="annot"><span class="annottext">satTopLevelExpr :: Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satTopLevelExpr"><span class="hs-identifier hs-var hs-var">satTopLevelExpr</span></a></span></span><span> </span><span id="local-6989586621680957739"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957739"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680957738"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957738"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-180"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957737"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957737"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957736"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957736"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957735"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957735"><span class="hs-identifier hs-var">expr_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957739"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957738"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-181"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo) -&gt; SatM (Expr Id, IdSATInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957737"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957735"><span class="hs-identifier hs-var">expr_app</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957736"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-type">satExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdAppInfo"><span class="hs-identifier hs-type">IdAppInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span id="satExpr"><span class="annot"><span class="annottext">satExpr :: Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var hs-var">satExpr</span></a></span></span><span> </span><span id="local-6989586621680957734"><span class="annot"><span class="annottext">var :: Expr Id
</span><a href="#local-6989586621680957734"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621680957732"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957732"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957731"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957731"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-185"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957729"><span class="annot"><span class="annottext">app_info :: Maybe (Id, [a])
</span><a href="#local-6989586621680957729"><span class="hs-identifier hs-var hs-var">app_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957732"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-operator hs-var">`elementOfUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957731"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-186"></span><span>                   </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(Id, [a]) -&gt; Maybe (Id, [a])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957732"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe (Id, [a])
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-188"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957734"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var">emptyIdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall {a}. Maybe (Id, [a])
</span><a href="#local-6989586621680957729"><span class="hs-identifier hs-var">app_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span id="local-6989586621680957728"><span class="annot"><span class="annottext">lit :: Expr Id
</span><a href="#local-6989586621680957728"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-191"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957728"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var">emptyIdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-type">Lam</span></a></span><span> </span><span id="local-6989586621680957725"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957725"><span class="hs-identifier hs-var">binders</span></a></span></span><span> </span><span id="local-6989586621680957724"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957724"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957723"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957723"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957722"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957722"><span class="hs-identifier hs-var">body'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957721"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957721"><span class="hs-identifier hs-var">sat_info</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957720"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957720"><span class="hs-identifier hs-var">this_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957724"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957723"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Expr Id -&gt; Expr Id
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957725"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957722"><span class="hs-identifier hs-var">body'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957720"><span class="hs-identifier hs-var">this_app</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957721"><span class="hs-identifier hs-var">sat_info</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span id="local-6989586621680957718"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957718"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621680957717"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957717"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957716"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957716"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957715"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957715"><span class="hs-identifier hs-var">fn'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957714"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957714"><span class="hs-identifier hs-var">sat_info_fn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957713"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957713"><span class="hs-identifier hs-var">fn_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957718"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957716"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957712"><span class="annot"><span class="annottext">satRemainder :: Maybe IdAppInfo -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957712"><span class="hs-identifier hs-var hs-var">satRemainder</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr Id
-&gt; IdSATInfo
-&gt; Maybe IdAppInfo
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957711"><span class="hs-identifier hs-var">boring</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957715"><span class="hs-identifier hs-var">fn'</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957714"><span class="hs-identifier hs-var">sat_info_fn</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957713"><span class="hs-identifier hs-var">fn_app</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-201"></span><span>        </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957712"><span class="hs-identifier hs-var">satRemainder</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-202"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957710"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957710"><span class="hs-identifier hs-var">fn_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957709"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957709"><span class="hs-identifier hs-var">fn_app_info</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-203"></span><span>            </span><span class="hs-comment">-- TODO: remove this use of append somehow (use a data structure with O(1) append but a left-to-right kind of interface)</span><span>
</span><span id="line-204"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957708"><span class="annot"><span class="annottext">satRemainderWithStaticness :: Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957708"><span class="hs-identifier hs-var hs-var">satRemainderWithStaticness</span></a></span></span><span> </span><span id="local-6989586621680957707"><span class="annot"><span class="annottext">Staticness App
</span><a href="#local-6989586621680957707"><span class="hs-identifier hs-var">arg_staticness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957712"><span class="hs-identifier hs-var">satRemainder</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe IdAppInfo -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo))
-&gt; Maybe IdAppInfo -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IdAppInfo -&gt; Maybe IdAppInfo
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957710"><span class="hs-identifier hs-var">fn_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957709"><span class="hs-identifier hs-var">fn_app_info</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SATInfo -&gt; SATInfo
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Staticness App
</span><a href="#local-6989586621680957707"><span class="hs-identifier hs-var">arg_staticness</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957717"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-206"></span><span>                </span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span id="local-6989586621680957705"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957705"><span class="hs-identifier hs-var">t</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957708"><span class="hs-identifier hs-var">satRemainderWithStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo))
-&gt; Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#TypeApp"><span class="hs-identifier hs-var">TypeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957705"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>                </span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span id="local-6989586621680957703"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957703"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957708"><span class="hs-identifier hs-var">satRemainderWithStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo))
-&gt; Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#CoApp"><span class="hs-identifier hs-var">CoApp</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957703"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>                </span><span class="annot"><a href="GHC.Core.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621680957702"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957702"><span class="hs-identifier hs-var">v</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957708"><span class="hs-identifier hs-var">satRemainderWithStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo))
-&gt; Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">App -&gt; Staticness App
forall a. a -&gt; Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-var">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; App
</span><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-var">VarApp</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957702"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>                </span><span class="annot"><span class="annottext">Expr Id
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957708"><span class="hs-identifier hs-var">satRemainderWithStaticness</span></a></span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo))
-&gt; Staticness App -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-211"></span><span>    </span><span class="annot"><a href="#local-6989586621680957711"><span class="hs-identifier hs-type">boring</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdAppInfo"><span class="hs-identifier hs-type">IdAppInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdSATInfo"><span class="hs-identifier hs-type">IdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#IdAppInfo"><span class="hs-identifier hs-type">IdAppInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>    </span><span id="local-6989586621680957711"><span class="annot"><span class="annottext">boring :: Expr Id
-&gt; IdSATInfo
-&gt; Maybe IdAppInfo
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="#local-6989586621680957711"><span class="hs-identifier hs-var hs-var">boring</span></a></span></span><span> </span><span id="local-6989586621680957701"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957701"><span class="hs-identifier hs-var">fn'</span></a></span></span><span> </span><span id="local-6989586621680957700"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957700"><span class="hs-identifier hs-var">sat_info_fn</span></a></span></span><span> </span><span id="local-6989586621680957699"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957699"><span class="hs-identifier hs-var">app_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-213"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957698"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957698"><span class="hs-identifier hs-var">arg'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957697"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957697"><span class="hs-identifier hs-var">sat_info_arg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957696"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957696"><span class="hs-identifier hs-var">arg_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957717"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957716"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-214"></span><span>           </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957695"><span class="annot"><span class="annottext">sat_info_arg' :: IdSATInfo
</span><a href="#local-6989586621680957695"><span class="hs-identifier hs-var hs-var">sat_info_arg'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957696"><span class="hs-identifier hs-var">arg_app</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957697"><span class="hs-identifier hs-var">sat_info_arg</span></a></span><span>
</span><span id="line-215"></span><span>               </span><span id="local-6989586621680957694"><span class="annot"><span class="annottext">sat_info :: IdSATInfo
</span><a href="#local-6989586621680957694"><span class="hs-identifier hs-var hs-var">sat_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var">mergeIdSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957700"><span class="hs-identifier hs-var">sat_info_fn</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957695"><span class="hs-identifier hs-var">sat_info_arg'</span></a></span><span>
</span><span id="line-216"></span><span>           </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id -&gt; Expr Id -&gt; Expr Id
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-identifier hs-var">App</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957701"><span class="hs-identifier hs-var">fn'</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957698"><span class="hs-identifier hs-var">arg'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957694"><span class="hs-identifier hs-var">sat_info</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957699"><span class="hs-identifier hs-var">app_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Case"><span class="hs-identifier hs-type">Case</span></a></span><span> </span><span id="local-6989586621680957692"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957692"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680957691"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957691"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680957690"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957690"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680957689"><span class="annot"><span class="annottext">[Alt Id]
</span><a href="#local-6989586621680957689"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957688"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957688"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-219"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957687"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957687"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957686"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957686"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957685"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957685"><span class="hs-identifier hs-var">expr_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957692"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957688"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957684"><span class="annot"><span class="annottext">sat_info_expr' :: IdSATInfo
</span><a href="#local-6989586621680957684"><span class="hs-identifier hs-var hs-var">sat_info_expr'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#finalizeApp"><span class="hs-identifier hs-var">finalizeApp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957685"><span class="hs-identifier hs-var">expr_app</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957686"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>    </span><span id="local-6989586621680957683"><span class="annot"><span class="annottext">[(Alt Id, IdSATInfo)]
</span><a href="#local-6989586621680957683"><span class="hs-identifier hs-var">zipped_alts'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Alt Id -&gt; UniqSM (Alt Id, IdSATInfo))
-&gt; [Alt Id] -&gt; UniqSM [(Alt Id, IdSATInfo)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Alt Id -&gt; UniqSM (Alt Id, IdSATInfo)
forall {a} {b}.
(a, b, Expr Id) -&gt; UniqSM ((a, b, Expr Id), IdSATInfo)
</span><a href="#local-6989586621680957682"><span class="hs-identifier hs-var">satAlt</span></a></span><span> </span><span class="annot"><span class="annottext">[Alt Id]
</span><a href="#local-6989586621680957689"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957681"><span class="annot"><span class="annottext">[Alt Id]
</span><a href="#local-6989586621680957681"><span class="hs-identifier hs-var">alts'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957680"><span class="annot"><span class="annottext">[IdSATInfo]
</span><a href="#local-6989586621680957680"><span class="hs-identifier hs-var">sat_infos_alts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Alt Id, IdSATInfo)] -&gt; ([Alt Id], [IdSATInfo])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(Alt Id, IdSATInfo)]
</span><a href="#local-6989586621680957683"><span class="hs-identifier hs-var">zipped_alts'</span></a></span><span>
</span><span id="line-224"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id -&gt; Id -&gt; Type -&gt; [Alt Id] -&gt; Expr Id
forall b. Expr b -&gt; b -&gt; Type -&gt; [Alt b] -&gt; Expr b
</span><a href="GHC.Core.html#Case"><span class="hs-identifier hs-var">Case</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957687"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957691"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680957690"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">[Alt Id]
</span><a href="#local-6989586621680957681"><span class="hs-identifier hs-var">alts'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var">mergeIdSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957684"><span class="hs-identifier hs-var">sat_info_expr'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[IdSATInfo] -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfos"><span class="hs-identifier hs-var">mergeIdSATInfos</span></a></span><span> </span><span class="annot"><span class="annottext">[IdSATInfo]
</span><a href="#local-6989586621680957680"><span class="hs-identifier hs-var">sat_infos_alts</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-226"></span><span>    </span><span id="local-6989586621680957682"><span class="annot"><span class="annottext">satAlt :: (a, b, Expr Id) -&gt; UniqSM ((a, b, Expr Id), IdSATInfo)
</span><a href="#local-6989586621680957682"><span class="hs-identifier hs-var hs-var">satAlt</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957677"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680957677"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957676"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680957676"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957675"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957675"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-227"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680957674"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957674"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957673"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957673"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satTopLevelExpr"><span class="hs-identifier hs-var">satTopLevelExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957675"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957688"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-228"></span><span>        </span><span class="annot"><span class="annottext">((a, b, Expr Id), IdSATInfo) -&gt; UniqSM ((a, b, Expr Id), IdSATInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680957677"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680957676"><span class="hs-identifier hs-var">bndrs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957674"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957673"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span id="local-6989586621680957671"><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957671"><span class="hs-identifier hs-var">bind</span></a></span></span><span> </span><span id="local-6989586621680957670"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957670"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957669"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957669"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-231"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957668"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957668"><span class="hs-identifier hs-var">body'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957667"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957667"><span class="hs-identifier hs-var">sat_info_body</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957666"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957666"><span class="hs-identifier hs-var">body_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957670"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957669"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-232"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957665"><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957665"><span class="hs-identifier hs-var">bind'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957664"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957664"><span class="hs-identifier hs-var">sat_info_bind</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; IdSet -&gt; SatM (CoreBind, IdSATInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satBind"><span class="hs-identifier hs-var">satBind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957671"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957669"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBind -&gt; Expr Id -&gt; Expr Id
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680957665"><span class="hs-identifier hs-var">bind'</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957668"><span class="hs-identifier hs-var">body'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo -&gt; IdSATInfo -&gt; IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#mergeIdSATInfo"><span class="hs-identifier hs-var">mergeIdSATInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957667"><span class="hs-identifier hs-var">sat_info_body</span></a></span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957664"><span class="hs-identifier hs-var">sat_info_bind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957666"><span class="hs-identifier hs-var">body_app</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span id="local-6989586621680957662"><span class="annot"><span class="annottext">Tickish Id
</span><a href="#local-6989586621680957662"><span class="hs-identifier hs-var">tickish</span></a></span></span><span> </span><span id="local-6989586621680957661"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957661"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957660"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957660"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957659"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957659"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957658"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957658"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957657"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957657"><span class="hs-identifier hs-var">expr_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957661"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957660"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-237"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tickish Id -&gt; Expr Id -&gt; Expr Id
forall b. Tickish Id -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Id
</span><a href="#local-6989586621680957662"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957659"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957658"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957657"><span class="hs-identifier hs-var">expr_app</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span id="local-6989586621680957656"><span class="annot"><span class="annottext">ty :: Expr Id
</span><a href="#local-6989586621680957656"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-240"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957656"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var">emptyIdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span id="local-6989586621680957655"><span class="annot"><span class="annottext">co :: Expr Id
</span><a href="#local-6989586621680957655"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-243"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957655"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="GHC.Core.Opt.StaticArgs.html#emptyIdSATInfo"><span class="hs-identifier hs-var">emptyIdSATInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-type">Cast</span></a></span><span> </span><span id="local-6989586621680957653"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957653"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680957652"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957652"><span class="hs-identifier hs-var">coercion</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680957651"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957651"><span class="hs-identifier hs-var">interesting_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-246"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680957650"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957650"><span class="hs-identifier hs-var">expr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957649"><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957649"><span class="hs-identifier hs-var">sat_info_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680957648"><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957648"><span class="hs-identifier hs-var">expr_app</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; IdSet -&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
</span><a href="GHC.Core.Opt.StaticArgs.html#satExpr"><span class="hs-identifier hs-var">satExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957653"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680957651"><span class="hs-identifier hs-var">interesting_ids</span></a></span><span>
</span><span id="line-247"></span><span>    </span><span class="annot"><span class="annottext">(Expr Id, IdSATInfo, Maybe IdAppInfo)
-&gt; SatM (Expr Id, IdSATInfo, Maybe IdAppInfo)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id -&gt; Coercion -&gt; Expr Id
forall b. Expr b -&gt; Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-var">Cast</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957650"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680957652"><span class="hs-identifier hs-var">coercion</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IdSATInfo
</span><a href="#local-6989586621680957649"><span class="hs-identifier hs-var">sat_info_expr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe IdAppInfo
</span><a href="#local-6989586621680957648"><span class="hs-identifier hs-var">expr_app</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="hs-comment">{-
************************************************************************

                Static Argument Transformation Monad

************************************************************************
-}</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-keyword">type</span><span> </span><span id="SatM"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-var">SatM</span></a></span></span><span> </span><span id="local-6989586621680957647"><span class="annot"><a href="#local-6989586621680957647"><span class="hs-identifier hs-type">result</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680957647"><span class="hs-identifier hs-type">result</span></a></span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span id="local-6989586621680957976"><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#runSAT"><span class="hs-identifier hs-type">runSAT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680957976"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680957976"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-260"></span><span id="runSAT"><span class="annot"><span class="annottext">runSAT :: forall a. UniqSupply -&gt; SatM a -&gt; a
</span><a href="GHC.Core.Opt.StaticArgs.html#runSAT"><span class="hs-identifier hs-var hs-var">runSAT</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; UniqSM a -&gt; a
forall a. UniqSupply -&gt; SatM a -&gt; a
</span><a href="GHC.Types.Unique.Supply.html#initUs_"><span class="hs-identifier hs-var">initUs_</span></a></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#newUnique"><span class="hs-identifier hs-type">newUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-263"></span><span id="newUnique"><span class="annot"><span class="annottext">newUnique :: SatM Unique
</span><a href="GHC.Core.Opt.StaticArgs.html#newUnique"><span class="hs-identifier hs-var hs-var">newUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SatM Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span class="hs-comment">{-
************************************************************************

                Static Argument Transformation Monad

************************************************************************

To do the transformation, the game plan is to:

1. Create a small nonrecursive RHS that takes the
   original arguments to the function but discards
   the ones that are static and makes a call to the
   SATed version with the remainder. We intend that
   this will be inlined later, removing the overhead

2. Bind this nonrecursive RHS over the original body
   WITH THE SAME UNIQUE as the original body so that
   any recursive calls to the original now go via
   the small wrapper

3. Rebind the original function to a new one which contains
   our SATed function and just makes a call to it:
   we call the thing making this call the local body

Example: transform this

    map :: forall a b. (a-&gt;b) -&gt; [a] -&gt; [b]
    map = /\ab. \(f:a-&gt;b) (as:[a]) -&gt; body[map]
to
    map :: forall a b. (a-&gt;b) -&gt; [a] -&gt; [b]
    map = /\ab. \(f:a-&gt;b) (as:[a]) -&gt;
         letrec map' :: [a] -&gt; [b]
                    -- The &quot;worker function
                map' = \(as:[a]) -&gt;
                         let map :: forall a' b'. (a -&gt; b) -&gt; [a] -&gt; [b]
                                -- The &quot;shadow function
                             map = /\a'b'. \(f':(a-&gt;b) (as:[a]).
                                   map' as
                         in body[map]
         in map' as

Note [Shadow binding]
~~~~~~~~~~~~~~~~~~~~~
The calls to the inner map inside body[map] should get inlined
by the local re-binding of 'map'.  We call this the &quot;shadow binding&quot;.

But we can't use the original binder 'map' unchanged, because
it might be exported, in which case the shadow binding won't be
discarded as dead code after it is inlined.

So we use a hack: we make a new SysLocal binder with the *same* unique
as binder.  (Another alternative would be to reset the export flag.)

Note [Binder type capture]
~~~~~~~~~~~~~~~~~~~~~~~~~~
Notice that in the inner map (the &quot;shadow function&quot;), the static arguments
are discarded -- it's as if they were underscores.  Instead, mentions
of these arguments (notably in the types of dynamic arguments) are bound
by the *outer* lambdas of the main function.  So we must make up fresh
names for the static arguments so that they do not capture variables
mentioned in the types of dynamic args.

In the map example, the shadow function must clone the static type
argument a,b, giving a',b', to ensure that in the \(as:[a]), the 'a'
is bound by the outer forall.  We clone f' too for consistency, but
that doesn't matter either way because static Id arguments aren't
mentioned in the shadow binding at all.

If we don't we get something like this:

[Exported]
[Arity 3]
GHC.Base.until =
  \ (@ a_aiK)
    (p_a6T :: a_aiK -&gt; GHC.Types.Bool)
    (f_a6V :: a_aiK -&gt; a_aiK)
    (x_a6X :: a_aiK) -&gt;
    letrec {
      sat_worker_s1aU :: a_aiK -&gt; a_aiK
      []
      sat_worker_s1aU =
        \ (x_a6X :: a_aiK) -&gt;
          let {
            sat_shadow_r17 :: forall a_a3O.
                              (a_a3O -&gt; GHC.Types.Bool) -&gt; (a_a3O -&gt; a_a3O) -&gt; a_a3O -&gt; a_a3O
            []
            sat_shadow_r17 =
              \ (@ a_aiK)
                (p_a6T :: a_aiK -&gt; GHC.Types.Bool)
                (f_a6V :: a_aiK -&gt; a_aiK)
                (x_a6X :: a_aiK) -&gt;
                sat_worker_s1aU x_a6X } in
          case p_a6T x_a6X of wild_X3y [ALWAYS Dead Nothing] {
            GHC.Types.False -&gt; GHC.Base.until @ a_aiK p_a6T f_a6V (f_a6V x_a6X);
            GHC.Types.True -&gt; x_a6X
          }; } in
    sat_worker_s1aU x_a6X

Where sat_shadow has captured the type variables of x_a6X etc as it has a a_aiK
type argument. This is bad because it means the application sat_worker_s1aU x_a6X
is not well typed.
-}</span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#saTransformMaybe"><span class="hs-identifier hs-type">saTransformMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span>
</span><span id="line-369"></span><span id="saTransformMaybe"><span class="annot"><span class="annottext">saTransformMaybe :: Id -&gt; Maybe SATInfo -&gt; [Id] -&gt; Expr Id -&gt; SatM CoreBind
</span><a href="GHC.Core.Opt.StaticArgs.html#saTransformMaybe"><span class="hs-identifier hs-var hs-var">saTransformMaybe</span></a></span></span><span> </span><span id="local-6989586621680957643"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957643"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680957642"><span class="annot"><span class="annottext">Maybe SATInfo
</span><a href="#local-6989586621680957642"><span class="hs-identifier hs-var">maybe_arg_staticness</span></a></span></span><span> </span><span id="local-6989586621680957641"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957641"><span class="hs-identifier hs-var">rhs_binders</span></a></span></span><span> </span><span id="local-6989586621680957640"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957640"><span class="hs-identifier hs-var">rhs_body</span></a></span></span><span>
</span><span id="line-370"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680957639"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957639"><span class="hs-identifier hs-var">arg_staticness</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe SATInfo
</span><a href="#local-6989586621680957642"><span class="hs-identifier hs-var">maybe_arg_staticness</span></a></span><span>
</span><span id="line-371"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; Bool
</span><a href="#local-6989586621680957638"><span class="hs-identifier hs-var">should_transform</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957639"><span class="hs-identifier hs-var">arg_staticness</span></a></span><span>
</span><span id="line-372"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SATInfo -&gt; [Id] -&gt; Expr Id -&gt; SatM CoreBind
</span><a href="GHC.Core.Opt.StaticArgs.html#saTransform"><span class="hs-identifier hs-var">saTransform</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957643"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957639"><span class="hs-identifier hs-var">arg_staticness</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957641"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957640"><span class="hs-identifier hs-var">rhs_body</span></a></span><span>
</span><span id="line-373"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-374"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; SatM CoreBind
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Id, Expr Id)] -&gt; CoreBind
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957643"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Expr Id -&gt; Expr Id
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957641"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957640"><span class="hs-identifier hs-var">rhs_body</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-375"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-376"></span><span>    </span><span id="local-6989586621680957638"><span class="annot"><span class="annottext">should_transform :: SATInfo -&gt; Bool
</span><a href="#local-6989586621680957638"><span class="hs-identifier hs-var hs-var">should_transform</span></a></span></span><span> </span><span id="local-6989586621680957631"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957631"><span class="hs-identifier hs-var">staticness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680957630"><span class="hs-identifier hs-var">n_static_args</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-comment">-- THIS IS THE DECISION POINT</span><span>
</span><span id="line-377"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-378"></span><span>        </span><span id="local-6989586621680957630"><span class="annot"><span class="annottext">n_static_args :: Int
</span><a href="#local-6989586621680957630"><span class="hs-identifier hs-var hs-var">n_static_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Staticness App -&gt; Bool) -&gt; SATInfo -&gt; Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Int
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; Bool
</span><a href="GHC.Core.Opt.StaticArgs.html#isStaticValue"><span class="hs-identifier hs-var">isStaticValue</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957631"><span class="hs-identifier hs-var">staticness</span></a></span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#saTransform"><span class="hs-identifier hs-type">saTransform</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SATInfo"><span class="hs-identifier hs-type">SATInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#SatM"><span class="hs-identifier hs-type">SatM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span>
</span><span id="line-381"></span><span id="saTransform"><span class="annot"><span class="annottext">saTransform :: Id -&gt; SATInfo -&gt; [Id] -&gt; Expr Id -&gt; SatM CoreBind
</span><a href="GHC.Core.Opt.StaticArgs.html#saTransform"><span class="hs-identifier hs-var hs-var">saTransform</span></a></span></span><span> </span><span id="local-6989586621680957626"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957626"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680957625"><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957625"><span class="hs-identifier hs-var">arg_staticness</span></a></span></span><span> </span><span id="local-6989586621680957624"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957624"><span class="hs-identifier hs-var">rhs_binders</span></a></span></span><span> </span><span id="local-6989586621680957623"><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957623"><span class="hs-identifier hs-var">rhs_body</span></a></span></span><span>
</span><span id="line-382"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680957622"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957622"><span class="hs-identifier hs-var">shadow_lam_bndrs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">((Id, Staticness App) -&gt; UniqSM Id)
-&gt; [(Id, Staticness App)] -&gt; UniqSM [Id]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">(Id, Staticness App) -&gt; UniqSM Id
forall {a}. (Id, Staticness a) -&gt; UniqSM Id
</span><a href="#local-6989586621680957621"><span class="hs-identifier hs-var">clone</span></a></span><span> </span><span class="annot"><span class="annottext">[(Id, Staticness App)]
</span><a href="#local-6989586621680957620"><span class="hs-identifier hs-var">binders_w_staticness</span></a></span><span>
</span><span id="line-383"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680957619"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957619"><span class="hs-identifier hs-var">uniq</span></a></span></span><span>             </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SatM Unique
</span><a href="GHC.Core.Opt.StaticArgs.html#newUnique"><span class="hs-identifier hs-var">newUnique</span></a></span><span>
</span><span id="line-384"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; SatM CoreBind
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Expr Id -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957626"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; [Id] -&gt; Expr Id
</span><a href="#local-6989586621680957618"><span class="hs-identifier hs-var">mk_new_rhs</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957619"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957622"><span class="hs-identifier hs-var">shadow_lam_bndrs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-385"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-386"></span><span>    </span><span class="hs-comment">-- Running example: foldr</span><span>
</span><span id="line-387"></span><span>    </span><span class="hs-comment">-- foldr \alpha \beta c n xs = e, for some e</span><span>
</span><span id="line-388"></span><span>    </span><span class="hs-comment">-- arg_staticness = [Static TypeApp, Static TypeApp, Static VarApp, Static VarApp, NonStatic]</span><span>
</span><span id="line-389"></span><span>    </span><span class="hs-comment">-- rhs_binders = [\alpha, \beta, c, n, xs]</span><span>
</span><span id="line-390"></span><span>    </span><span class="hs-comment">-- rhs_body = e</span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span>    </span><span id="local-6989586621680957620"><span class="annot"><span class="annottext">binders_w_staticness :: [(Id, Staticness App)]
</span><a href="#local-6989586621680957620"><span class="hs-identifier hs-var hs-var">binders_w_staticness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957624"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; SATInfo -&gt; [(Id, Staticness App)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SATInfo
</span><a href="#local-6989586621680957625"><span class="hs-identifier hs-var">arg_staticness</span></a></span><span> </span><span class="annot"><span class="annottext">SATInfo -&gt; SATInfo -&gt; SATInfo
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App -&gt; SATInfo
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
forall a. Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>                                        </span><span class="hs-comment">-- Any extra args are assumed NotStatic</span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span>    </span><span class="annot"><a href="#local-6989586621680957616"><span class="hs-identifier hs-type">non_static_args</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-396"></span><span>            </span><span class="hs-comment">-- non_static_args = [xs]</span><span>
</span><span id="line-397"></span><span>            </span><span class="hs-comment">-- rhs_binders_without_type_capture = [\alpha', \beta', c, n, xs]</span><span>
</span><span id="line-398"></span><span>    </span><span id="local-6989586621680957616"><span class="annot"><span class="annottext">non_static_args :: [Id]
</span><a href="#local-6989586621680957616"><span class="hs-identifier hs-var hs-var">non_static_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957614"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957614"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957614"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Id, Staticness App)]
</span><a href="#local-6989586621680957620"><span class="hs-identifier hs-var">binders_w_staticness</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span>    </span><span id="local-6989586621680957621"><span class="annot"><span class="annottext">clone :: (Id, Staticness a) -&gt; UniqSM Id
</span><a href="#local-6989586621680957621"><span class="hs-identifier hs-var hs-var">clone</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957610"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957610"><span class="hs-identifier hs-var">bndr</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Staticness a
</span><a href="GHC.Core.Opt.StaticArgs.html#NotStatic"><span class="hs-identifier hs-var">NotStatic</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; UniqSM Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957610"><span class="hs-identifier hs-var">bndr</span></a></span><span>
</span><span id="line-401"></span><span>    </span><span class="annot"><a href="#local-6989586621680957621"><span class="hs-identifier hs-var">clone</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680957609"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957609"><span class="hs-identifier hs-var">bndr</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Staticness a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680957608"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957608"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SatM Unique
</span><a href="GHC.Core.Opt.StaticArgs.html#newUnique"><span class="hs-identifier hs-var">newUnique</span></a></span><span>
</span><span id="line-402"></span><span>                                 </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; UniqSM Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unique -&gt; Id
</span><a href="GHC.Types.Var.html#setVarUnique"><span class="hs-identifier hs-var">setVarUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957609"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957608"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-403"></span><span>
</span><span id="line-404"></span><span>    </span><span class="hs-comment">-- new_rhs = \alpha beta c n xs -&gt;</span><span>
</span><span id="line-405"></span><span>    </span><span class="hs-comment">--           let sat_worker = \xs -&gt; let sat_shadow = \alpha' beta' c n xs -&gt;</span><span>
</span><span id="line-406"></span><span>    </span><span class="hs-comment">--                                       sat_worker xs</span><span>
</span><span id="line-407"></span><span>    </span><span class="hs-comment">--                                   in e</span><span>
</span><span id="line-408"></span><span>    </span><span class="hs-comment">--           in sat_worker xs</span><span>
</span><span id="line-409"></span><span>    </span><span id="local-6989586621680957618"><span class="annot"><span class="annottext">mk_new_rhs :: Unique -&gt; [Id] -&gt; Expr Id
</span><a href="#local-6989586621680957618"><span class="hs-identifier hs-var hs-var">mk_new_rhs</span></a></span></span><span> </span><span id="local-6989586621680957606"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957606"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680957605"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957605"><span class="hs-identifier hs-var">shadow_lam_bndrs</span></a></span></span><span>
</span><span id="line-410"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Expr Id -&gt; Expr Id
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957624"><span class="hs-identifier hs-var">rhs_binders</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr Id -&gt; Expr Id) -&gt; Expr Id -&gt; Expr Id
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-411"></span><span>          </span><span class="annot"><span class="annottext">CoreBind -&gt; Expr Id -&gt; Expr Id
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Id, Expr Id)] -&gt; CoreBind
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957604"><span class="hs-identifier hs-var">rec_body_bndr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957603"><span class="hs-identifier hs-var">rec_body</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span>          </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957602"><span class="hs-identifier hs-var">local_body</span></a></span><span>
</span><span id="line-413"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-414"></span><span>          </span><span id="local-6989586621680957602"><span class="annot"><span class="annottext">local_body :: Expr Id
</span><a href="#local-6989586621680957602"><span class="hs-identifier hs-var hs-var">local_body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr Id -&gt; [Id] -&gt; Expr Id
forall b. Expr b -&gt; [Id] -&gt; Expr b
</span><a href="GHC.Core.html#mkVarApps"><span class="hs-identifier hs-var">mkVarApps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Expr Id
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957604"><span class="hs-identifier hs-var">rec_body_bndr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957616"><span class="hs-identifier hs-var">non_static_args</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span>          </span><span id="local-6989586621680957603"><span class="annot"><span class="annottext">rec_body :: Expr Id
</span><a href="#local-6989586621680957603"><span class="hs-identifier hs-var hs-var">rec_body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Expr Id -&gt; Expr Id
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957616"><span class="hs-identifier hs-var">non_static_args</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr Id -&gt; Expr Id) -&gt; Expr Id -&gt; Expr Id
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-417"></span><span>                     </span><span class="annot"><span class="annottext">CoreBind -&gt; Expr Id -&gt; Expr Id
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Expr Id -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957598"><span class="hs-identifier hs-var">shadow_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957597"><span class="hs-identifier hs-var">shadow_rhs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957623"><span class="hs-identifier hs-var">rhs_body</span></a></span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span>            </span><span class="hs-comment">-- See Note [Binder type capture]</span><span>
</span><span id="line-420"></span><span>          </span><span id="local-6989586621680957597"><span class="annot"><span class="annottext">shadow_rhs :: Expr Id
</span><a href="#local-6989586621680957597"><span class="hs-identifier hs-var hs-var">shadow_rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Expr Id -&gt; Expr Id
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680957605"><span class="hs-identifier hs-var">shadow_lam_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957602"><span class="hs-identifier hs-var">local_body</span></a></span><span>
</span><span id="line-421"></span><span>            </span><span class="hs-comment">-- nonrec_rhs = \alpha' beta' c n xs -&gt; sat_worker xs</span><span>
</span><span id="line-422"></span><span>
</span><span id="line-423"></span><span>          </span><span id="local-6989586621680957604"><span class="annot"><span class="annottext">rec_body_bndr :: Id
</span><a href="#local-6989586621680957604"><span class="hs-identifier hs-var hs-var">rec_body_bndr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Type -&gt; Type -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-var">mkSysLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sat_worker&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680957606"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957603"><span class="hs-identifier hs-var">rec_body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-424"></span><span>            </span><span class="hs-comment">-- rec_body_bndr = sat_worker</span><span>
</span><span id="line-425"></span><span>
</span><span id="line-426"></span><span>            </span><span class="hs-comment">-- See Note [Shadow binding]; make a SysLocal</span><span>
</span><span id="line-427"></span><span>          </span><span id="local-6989586621680957598"><span class="annot"><span class="annottext">shadow_bndr :: Id
</span><a href="#local-6989586621680957598"><span class="hs-identifier hs-var hs-var">shadow_bndr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Type -&gt; Type -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-var">mkSysLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957626"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-428"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unique
</span><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier hs-var">idUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680957626"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-429"></span><span>                                   </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span>
</span><span id="line-430"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr Id -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">Expr Id
</span><a href="#local-6989586621680957597"><span class="hs-identifier hs-var">shadow_rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#isStaticValue"><span class="hs-identifier hs-type">isStaticValue</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Staticness"><span class="hs-identifier hs-type">Staticness</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-433"></span><span id="isStaticValue"><span class="annot"><span class="annottext">isStaticValue :: Staticness App -&gt; Bool
</span><a href="GHC.Core.Opt.StaticArgs.html#isStaticValue"><span class="hs-identifier hs-var hs-var">isStaticValue</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#Static"><span class="hs-identifier hs-type">Static</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#VarApp"><span class="hs-identifier hs-type">VarApp</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-434"></span><span class="annot"><a href="GHC.Core.Opt.StaticArgs.html#isStaticValue"><span class="hs-identifier hs-var">isStaticValue</span></a></span><span> </span><span class="annot"><span class="annottext">Staticness App
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-435"></span></pre></body></html>